//
//  AlertViewViewController.m
//  AlertView
//

#import "AlertViewViewController.h"

@implementation AlertViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	UIAlertView *myAlert = [[UIAlertView alloc]
							initWithTitle:@"title"
							message:@"message"
							delegate:self
							cancelButtonTitle:@"OK"
							otherButtonTitles:nil];
	
	[myAlert addButtonWithTitle:@"new button"];
	[myAlert addButtonWithTitle:@"another button"];
	
	[myAlert show];
	
	[myAlert release];
}

- (void)alertView:(UIAlertView *)alertView
clickedButtonAtIndex:(NSInteger)buttonIndex {
	NSLog(@"you clicked button: %i", buttonIndex);
}

- (void)dealloc {
    [super dealloc];
}

@end
